import instance from './client'

export var BLOG_LIST = (params) => {
  return instance.get('/vblog/api/v1/blogs', { params })
}

export var BLOG_CREATE = (data) => {
  return instance.post('/vblog/api/v1/blogs', data, {
    headers: { 'Content-Type': 'application/json' }
  })
}

export var BLOG_GET = (id) => {
  return instance.get(`/vblog/api/v1/blogs/${id}`)
}

export var BLOG_UPDATE = (id, data) => {
  return instance.put(`/vblog/api/v1/blogs/${id}`, data)
}

export var BLOG_DELETE = (id) => {
  return instance.delete(`/vblog/api/v1/blogs/${id}`)
}
